<template>
  <div>
    <div class="reportManagement">
      <!-- 标题 -->
      <div class="reportManagement-title">报告管理</div>


      <!-- 条件筛选 -->
      <!-- <div class="reportManagement-condition">
        <div class="reportManagement-condition-form">
          <normal-form-plus
            :formModel="formModel"
            :config="config"
            :plus="plus"/>
        </div>
        <div class="reportManagement-condition-btn">
          <el-button>查询</el-button>
          <el-button>重置</el-button>
          <el-button>新增</el-button>
        </div>
      </div> -->


      <!-- 表格-核算报告 -->
      <div class="reportManagement-report">
        <normal-table
          :tableData="tableData"
          :paginationConfig="paginationConfig"
          :tableLabel="tableLabel"
          :operationConfig="operationConfig"
          :operationList="operationList"
          @event="handleEvent"
          @changePage="changePage"></normal-table>
      </div>


    </div>
  </div>
</template>

<script>
import NormalTable from '@/components/NormalTable'
import NormalFormPlus from '@/components/NormalFormPlus'

export default {
  name: 'reportManagement',
  components: {
    NormalTable,
    NormalFormPlus
  },
  data() {
    return {
      formModel: {
        selection1: '',
        selection2: '',
        selection3: '',
      },
      config: [
        {
          id: 1,
          items: [
            {
              id: '1',
              edit: true,
              type: 'input',
              span: 6,
              model: 'modelLevel',
              name: '',
              props: {
                placeholder: "报告名称",

              }
            },
            {
              id: '2',
              edit: true,
              type: 'select',
              span: 6,
              model: 'modelLevel',
              name: '',
              props: {
                placeholder: "核算周期",
                options: [
                  {value: '1', label: '1'},
                  {value: '2', label: '2'}
                ]
              }
            }
          ]
        },
      ],
      plus: {},
      tableData: [
        {
          fileName: '碳核算清册 2023-01-02 21:59:32.doc',
          totalNum: '生成中',
          exportNum: '张三',
          errorNum: '2022-02-10 21:30:57',
        },
        {
          fileName: '碳核算清册 2023-01-02 21:59:32.doc',
          totalNum: '生成中',
          exportNum: '张三',
          errorNum: '2022-02-10 21:30:57',
        },
        {
          fileName: '碳核算清册 2023-01-02 21:59:32.doc',
          totalNum: '已生成',
          exportNum: '张三',
          errorNum: '2022-02-10 21:30:57',
        },
        {
          fileName: '碳核算清册 2023-01-02 21:59:32.doc',
          totalNum: '已生成',
          exportNum: '张三',
          errorNum: '2022-02-10 21:30:57',
        },
        {
          fileName: '碳核算清册 2023-01-02 21:59:32.doc',
          totalNum: '已生成',
          exportNum: '张三',
          errorNum: '2022-02-10 21:30:57',
        },
        {
          fileName: '碳核算清册 2023-01-02 21:59:32.doc',
          totalNum: '已生成',
          exportNum: '张三',
          errorNum: '2022-02-10 21:30:57',
        },
        {
          fileName: '碳核算清册 2023-01-02 21:59:32.doc',
          totalNum: '已生成',
          exportNum: '张三',
          errorNum: '2022-02-10 21:30:57',
        },


      ],
      paginationConfig: {
        total: 100,
        page: 1,
        pageSize: 10,
        show: true
      },
      operationList: [
        {
          name: '下载',
          order: 1,
          buttonClass: 'primary',
          plus: {}
        }
      ],
      operationConfig: {select: false},
      tableLabel: [
        {
          prop: "order",
          label: "序号",
          width: 70
        },
        {
          prop: "fileName",
          label: "文件名称",
          width: 200
        },
        {
          prop: "totalNum",
          label: "文件状态"
        },
        {
          prop: "exportNum",
          label: "操作者",
          width: 200
        },
        {
          prop: "errorNum",
          label: "创建时间",
          width: 200
        }
      ],

    }
  },
  methods: {

    // 处理表格点击事件
    handleEvent(order, row) {
      if (order === 1) {

      }
    },
    // 分页点击事件
    changePage() {

    }
  }
}
</script>

<style lang="less" scoped>
.reportManagement {

  height: 680px;
  overflow: hidden;
  padding: 15px 10px;
  // 标题
  .reportManagement-title {
    font-size: 16px;
    font-weight: bold;
  }

  .reportManagement-condition {
    display: flex;

    .reportManagement-condition-form {
      flex: 3;
    }

    .reportManagement-condition-btn {
      flex: 1;
    }
  }

  // 核算报告表格
  .reportManagement-report {
    .reportManagement-history-title {
      font-size: 14px;
    }
  }
}
</style>
